import React from 'react';

export default class extends React.Component{
  constructor(props){
    super();
    this.state={
      active:props.active,
      Change:props.Change
    }
  }
  UNSAFE_componentWillReceiveProps(props){
    this.setState({
      active:props.active,
    })
  }
  Triggle(){
    let active=this.state.active;
    if(active===undefined){
      active=false;
    }
    this.setState({
      active:!active
    },()=>{
      if(this.props.Change!==undefined ){
          this.props.Change();
      }
  });
  }
  render(){
    return(
      <svg id="已付款_1_" data-name="已付款 (1)"  onClick={e=>this.Triggle(e)} fill={this.state.active?"#5393eb":"#999"} xmlns="http://www.w3.org/2000/svg" width="43.075" height="46.867" viewBox="0 0 43.075 46.867">
        <path id="路径_3582" data-name="路径 3582" class="cls-1" d="M290.795,212.587l-7.3,11.843c-.79-1.669-3.605-5.617-7.273-11.843h-3.488l7.949,12.536H273.95v2.543h7.84v4.045h-7.84v2.351h7.84v6.012h3.158v-6.012h7.572V231.71H284.9v-4.045h7.621v-2.543h-6.247l7.879-12.536h-3.357Z" transform="translate(-263.806 -204.871)"/>
        <path id="路径_3583" data-name="路径 3583" class="cls-1" d="M112.5,110.728a3.6,3.6,0,0,1-3.379-3.379V74.965a3.6,3.6,0,0,1,3.379-3.379h26.414a3.6,3.6,0,0,1,3.379,3.379V96.476a9.214,9.214,0,0,1,3.183,1.025V74.613a6.228,6.228,0,0,0-6.21-6.21H112.148a6.228,6.228,0,0,0-6.21,6.21V107.7a6.228,6.228,0,0,0,6.21,6.21h20.105a9.486,9.486,0,0,1-1.839-3.183H112.5Z" transform="translate(-105.938 -68.404)"/>
        <path id="路径_3584" data-name="路径 3584" class="cls-1" d="M597.885,622.572a8.6,8.6,0,1,0,8.613,8.6A8.6,8.6,0,0,0,597.885,622.572Z" transform="translate(-563.423 -592.915)"/>
      </svg>
    );
  }
}